<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/facelets/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"                 
                xmlns:f="http://java.sun.com/jsf/core">

<ui:param name="title" value="#{msg.dateProfileTitle}"/>
<ui:define name="headerBar">
    <ui:include src="WEB-INF/facelets/headerBar.xhtml"/>
</ui:define>

<ui:define name="pageContents">

    <h:panelGrid id="dateProfile" columns="2">
         <f:facet name="header">
            <h:outputText value="#{msg.dateProfilePanelHeader} #{dateProfileBackingBean.user.username}"/>
        </f:facet>
        <h:graphicImage id="profileImage"
                        url="#{dateProfileBackingBean.user.profilePic}" />
        <h:panelGrid id="dateProfileInner" columns="2">
            <h:outputLabel value="#{msg.dateProfileLabelAge}" />
            <h:outputLabel value="#{dateProfileBackingBean.user.userProperties.age}" />
            <h:outputLabel value="#{msg.dateProfileLabelHeight}" />
            <h:outputLabel value="#{dateProfileBackingBean.user.userProperties.height}" />
            <h:outputLabel value="#{msg.dateProfileLabelChildren}" />
            <h:outputLabel value="#{dateProfileBackingBean.user.userProperties.children}" />
            <h:outputLabel value="#{msg.dateProfileLabelSmoker}" />
            <h:outputLabel value="#{dateProfileBackingBean.user.userProperties.tobaccoUser}" />
            <f:facet name="footer">
                <h:outputText value="#{dateProfileBackingBean.user.presentation}" />
            </f:facet>
        </h:panelGrid>
        <f:facet name="footer">
            <h:form>
                <p:commandButton value="#{msg.sendMessageButton}" ajax="false" action="#{dateProfileBackingBean.sendMessage}" />
                <p:commandButton value="#{msg.addFriendButton}" ajax="false" action="#{dateProfileBackingBean.addFriend}"
                    disabled="#{dateProfileBackingBean.favorite}"/>
            </h:form>
        </f:facet>
    </h:panelGrid>
</ui:define>

<ui:param name="h1" value="#{msg.dateProfileHeader}"/>

</ui:composition>